package cn.aitrox.ry.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ListResult<T> {

    private List<T> list;

    public static <T> ListResult<T> create(List<T> list) {
        return new ListResult(list);
    }

    public static <T> ListResult<T> empty() {
        return new ListResult(new ArrayList());
    }
}
